body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f6f8fa;
  color: #24292e;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.navbar {
  background-color: #24292e;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  text-decoration: none;
  margin-right: 2rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-btn {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.nav-btn:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
  color: white;
  background-color: #0969da;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}

h1,
h2 {
  text-align: center;
  font-weight: 600;
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 0.5em;
  margin-top: 1em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  table-layout: fixed;
}

th,
td {
  border: 1px solid #dfe2e5;
  padding: 12px 15px;
  text-align: left;
  vertical-align: middle;
}

th {
  background-color: #f6f8fa;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
}

th:hover {
  background-color: #eaeef2;
}

tr:nth-child(even) {
  background-color: #f6f8fa;
}

th::after {
  content: ' \2195';
  position: absolute;
  right: 8px;
  opacity: 0.3;
  font-size: 0.8em;
}

th.asc::after {
  content: ' \2191';
  opacity: 1;
}

th.desc::after {
  content: ' \2193';
  opacity: 1;
}

.intro-container {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  text-align: left;
  color: #57606a;
  background-color: #fff;
  padding: 1.5rem;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  margin-bottom: 2rem;
}

.intro-row {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.intro-label {
  font-weight: 600;
  color: #24292e;
  margin-right: 5px;
}

.metric-def {
  margin-bottom: 5px;
  font-size: 0.95em;
}

.controls-area {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.toggle-group {
  display: inline-flex;
  background: #e1e4e8;
  padding: 4px;
  border-radius: 6px;
}

.toggle-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: #57606a;
  border-radius: 4px;
  transition: all 0.2s;
}

.toggle-btn:hover {
  color: #24292e;
}

.toggle-btn.active {
  background: white;
  color: #0969da;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox-label {
  font-weight: 600;
  color: #24292e;
  user-select: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.disclaimer-box {
  font-size: 0.9em;
  background-color: #fff8c5;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #d4a72c;
  color: #4a3b05;
  max-width: 600px;
  display: none;
  margin-top: 10px;
}

.disclaimer-box.visible {
  display: block;
}

.score-bar-wrapper {
  width: 100%;
  height: 24px;
  background-color: #e1e4e8;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  position: relative;
  cursor: help;
}

.bar-segment {
  height: 100%;
}

.score-bar-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  background: #24292e;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  white-space: nowrap;
  z-index: 10;
}

.score-bar-wrapper:hover .score-bar-tooltip {
  display: block;
}

.result-badge {
  font-weight: bold;
  text-transform: capitalize;
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  font-size: 0.85em;
  display: inline-block;
  min-width: 60px;
  text-align: center;
}

.result-badge.success {
  background-color: #2da44e;
}

.result-badge.fail {
  background-color: #cf222e;
}

.run-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 2px;
}

.run-dot.S {
  background-color: #2da44e;
}

.run-dot.F {
  background-color: #cf222e;
}

.failure-box {
  font-size: 0.9em;
  margin-bottom: 8px;
}

.failure-msg {
  font-family: "SFMono-Regular", Consolas, monospace;
  background-color: #f6f8fa;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  white-space: pre-wrap;
  max-height: 100px;
  overflow-y: auto;
}

.log-link {
  color: #0969da;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9em;
}

.log-link:hover {
  text-decoration: underline;
}

.model-link {
  text-decoration: none;
  color: #0969da;
  font-weight: bold;
  font-size: 1.05em;
}

.model-link:hover {
  text-decoration: underline;
}

.task-link {
  text-decoration: none;
  color: #24292e;
}

.task-link:hover {
  color: #0969da;
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #0969da;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}
